<html>
	<head>
		<meta http-equiv="content-type" content="text/html;charset=utf-8">
		<title>JS Basic</title>
		<script type="text/javascript">

			function test(){
				alert("Warnigggg");
			}
			
			function test1(){
				///alert("xxxxxxxxxxxxxxxxxxxxxxx");

			}
			function test2(){
				//alert("test2");
				//console.log("test2");
				var inputBox1=document.getElementById("name1");
				console.dir(inputBox1);
				console.log(inputBox1.value);
				var inputBox2=document.getElementById("name2");
				inputBox2.value=inputBox1.value;
			}

			function add(){
				var div4=document.getElementById("div4");
				console.dir(div4);
				div4.innerHTML+='<input type="text"><input type="button" value="-"><br/>';
			}
		</script>
	</head>
	<body onload="test1()">
		<div id="div1">
			<input type="button" value="Click me" onClick="test()">
		</div>
		<div id="div2">
			<input type="text" id="name1" >
			<input type="button" value="Test2" onClick="test2()">
			<input type="text" id="name2">
		</div>
		<div>
			<input type="button" value="Add" onClick="add()">
		</div>
		<div id="div4">
			
		</div>
		
	</body>
</html>